<!DOCTYPE html>

<html>

<head>

    <title>领取租赁费</title>

    <meta name="keywords" content="{$site_seo_keywords}" />

    <meta name="description" content="{$site_seo_description}">

    <style type="text/css">
        #two-con{
            width: 700px;
        }

        #two-con .control-label {
            float: left;
            width: 90px;
            padding-top: 5px;
            text-align: right;
        }
        #two-con input.span4{
            width: 200px;
        }
        #two-con select{
            height: 34px;
            line-height: 34px;
        }
        #two-con select.span4{
            width: 214px;
        }
        /*tips*/
        #two-con .help-inline {
            display: block;
            margin-bottom: -20px;
            *zoom: 1;
            font-size: 14px;
        }
        #two-con .controls {
            *display: inline-block;
            *padding-left: 20px;
            margin-left: 110px;
            *margin-left: 0
        }
        .reposition{
            width: 350px;
            float: left;
        }
        #btn-order-print{
            padding-left: 10px;
            display: inline-block;
            height: 20px;
            text-decoration: none;
        }
        input[type="checkbox"] {
            margin: 0px !important;
        }
    </style>


    <tc_include file="Public:head" />

</head>



<body class="body-white" id="top">

<tc_include file="Public:nav" />



<div class="container tc-main">

    <div class="row">

        <div class="span2">

            <tc_include file="Public:usernav"/>

        </div>

        <div class="span10">



            <if condition="$cardnum">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#">服务卡扣费</a></li>
                    <li><a href="{:leuu('User/Integral/integralhis', array('cardnum' => $userinfo['cardnum']))}">消费历史</a></li>
                </ul>
                <h3 style="margin-left:280px;color: #ff0000;">{$menu_name}</h3>
                <form class="form-horizontal" id="dd" action="#">
                    <input type="hidden" value="{$cardnum}" name="cardnum">
                    <input type="hidden" value="{$userinfo.name}" name="name">
                    <input type="hidden" value="{$userinfo.costcount}" name="costcount">
                    <input type="hidden" name="oldintegral" value="{$userinfo['integral']}" >
                    <input type="hidden" name="tel" value="{$userinfo.tel}">
                    <div class="control-group">
                        <label class="control-label" for="rentmoney"><span style="color: red;">*</span>消费积分:</label>
                        <div class="controls">
                            <input type="number" name="integral" id="rentmoney" class="span4">
                            <span class="help-inline" id="storedmoneystr" style="color: red;"></span>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="remark">备注:</label>
                        <div class="controls">
                            <textarea  id="remark" name="remark" style="width: 355px;height: 100px;"></textarea>
                            <span class="help-inline"></span>
                        </div>
                    </div>

                    <div class="control-group" style="margin-top: 50px;">
                        <label class="control-label" for=""></label>
                        <!--<p style="margin-bottom: 10px">-->
                            <!--<input type="checkbox" id="print-check">-->
                            <!--<a href="javascript:void(0)" id="btn-order-print" >打印</a>-->
                        <!--</p>-->
                        <div class="controls">
                            <button class="btn btn-primary js-ajax-submit span4" type="button" style="margin-left: 0px" id="subbtn">确定</button>
                        </div>
                    </div>

                    <hr>

                    <div id="two-con"  style="margin-left: 70px">
                        <div>
                            <div class="control-group reposition">
                                <label class="control-label" ><span style="color: red;">*</span>会员卡号:</label>
                                <div class="controls">
                                    <input type="text" id="vipcardnum" value="{$userinfo.cardnum}" disabled name="cardnum" class="span4">
                                </div>
                            </div>
                            <div class="control-group reposition">
                                <label class="control-label" >现有积分:</label>
                                <div class="controls">
                                    <input type="text" name="uintegral" disabled value="{$userinfo['integral']/100}" class="span4" >
                                    <div style="clear: both;"></div>
                                </div>
                            </div>
                            <div class="control-group reposition">
                                <label class="control-label" >姓名:</label>
                                <div class="controls">
                                    <input type="text" id="name" name="uname" disabled value="{$userinfo.name}" class="span4" >
                                    <div style="clear: both;"></div>
                                </div>
                            </div>
                            <div class="control-group reposition">
                                <label class="control-label" >电话:</label>
                                <div class="controls">
                                    <input type="text" id="utel" name="utel" disabled value="{$userinfo.tel}" class="span4" >
                                    <div style="clear: both;"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>

                <else/>
                <div>
                    <h3 style="margin-left:280px;color: #ff0000;">{$menu_name}</h3>
                    <form action="{:leuu('User/Integral/reduce')}" style="margin: 90px 0 0 20px;">
                        请输入会员卡号：<input name="cardnum" type="number">
                        <input type="submit" class="btn" style="vertical-align:top;">

                    </form>

                </div>

            </if>


        </div>

    </div>

    <tc_include file="Public:footer" />

</div>

<!-- /container -->

<tc_include file="Public:scripts" />

<script src="__PUBLIC__/js/tools.js"></script>
<script src="__PUBLIC__/js/jquery.print.js"></script>
<script type="text/javascript">
    
    $('#subbtn').click(function() {

        $.post("{:leuu('User/Integral/doreduce')}",$('#dd').serialize(),function(data){
            document.getElementById('subbtn').disabled=true;

            if(data.status == 1) {

                if(data.url) {

                    window.location.href=data.url;

                } else {

                    location.reload();

                }

            } else {

                alert(data.info);
                document.getElementById('subbtn').disabled=false;

            }

        })

    });



</script>

</body>

</html>